<template>
    <div>
        <a-card title="全部简历" :bordered="false">
            <div>
                <a-input-group compact>
                    <a-select v-model:value="value1" style="width: 8vw" @change="SelectChange">
                        <a-select-option value="name">简历名称</a-select-option>
                        <a-select-option value="mobile">简历联系方式</a-select-option>
                        <a-select-option value="mobile">会员联系方式</a-select-option>
                        <a-select-option value="id">简历ID</a-select-option>
                    </a-select>
                    <a-input-search placeholder="请输入搜索内容" v-model:value="value2" @change="getdata()" enter-button style="width: 18vw;margin-right: 5px;" />
                    <a-cascader
                        v-model="value3"
                        :options="options3"
                        placeholder="请选择意向地区"
                        change-on-select
                        style="margin: 0 5px;"
                        @change="getdata()"
                    />
                    <a-cascader
                        v-model="value4"
                        :options="options2"
                        placeholder="请选择意向职位"
                        change-on-select
                        style="margin: 0 5px;"
                        @change="getdata()"
                    />
                    <a-select
                        ref="select"
                        v-model="value5"
                        style="width: 150px;margin: 0 5px;"
                        placeholder="请选择注册来源"
                    >
                        <!-- <a-select-option value="请选择注册来源" disabled>请选择注册来源</a-select-option> -->
                        <a-select-option value="APP">APP</a-select-option>
                        <a-select-option value="手机浏览器">手机浏览器</a-select-option>
                        <a-select-option value="微信浏览器">微信浏览器</a-select-option>
                        <a-select-option value="微信小程序">微信小程序</a-select-option>
                        <a-select-option value="抖音小程序">抖音小程序</a-select-option>
                        <a-select-option value="电脑浏览器">电脑浏览器</a-select-option>
                        <a-select-option value="系统">系统</a-select-option>
                    </a-select>
                    <a-button type="primary" style="float: right;" @click="router.push('/resume/resume_add')">新增简历</a-button>
                </a-input-group>
            </div>
            <a-table 
                :columns="columns" 
                :data-source="datas" 
                style="margin-top: 5vh;" 
                :scroll="{ x: 3000, y: 320 }"
                :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
                :pagination="false"
                :rowKey="(data)=>data.id"
            >
                <template #user_img="{ column,record }">
                    <a-image width="100%" height="100%" :src="record.user_img"></a-image>
                </template>
                <template #action="{ column,record }">
                    <a style="margin: 2px;" @click="showDrawer(record)">查看</a>
                    <a style="margin: 2px;" @click="showDrawer(record)">跟进</a>
                    <a style="margin: 2px;" @click="showModal">审核</a>
                    <a @click="del(record.id)" style="margin: 2px;">删除</a>
                </template>
            </a-table>
            <br>
            <div style="display: flex;">
                <div style="flex: 1;">
                    <a-button type="primary" style="margin-right: 10px;">全选/反选</a-button>
                    <a-button type="primary" style="margin-right: 10px;" @click="getdata()">刷新简历</a-button>
                    <a-button type="primary" style="margin-right: 10px;">审核简历</a-button>
                    <a-button type="primary" style="margin-right: 10px;">简历等级</a-button>
                    <a-button type="primary" style="margin-right: 10px;">导入简历</a-button>
                </div>
                <a-pagination
                    :current="current1"
                    :page-size="pageSize1"
                    :total="count"
                    :show-total="total => `共 ${total} 条`"
                    showSizeChanger
                    showQuickJumper
                    @change="PageChange"
                    @showSizeChange="showSizeChange"
                />
            </div>
        </a-card>
        <a-drawer
            width="75vw"
            placement="right"
            :closable="false"
            destroyOnClose
            keyboard
            v-model:visible="visible"
            :after-visible-change="afterVisibleChange"
        >
            <div>
                <!-- 上 -->
                <div class="drawer_top">
                    <div style="width: 10%;">
                        <img style="width:100%;height: 100%;" src="http://houtai.74cmsse.tywangcai.com/upload/resource/empty_photo.png" alt="">
                    </div>
                    <div style="width: 40%;line-height: 25px;">
                        <p>
                            <span style="font-size:20px;font-weight: 700;margin-right: 10px;">{{formState.name}}</span>
                            <span>( 会员ID: 116；简历ID:81; <span style="color:blue;">一键登录个人会员中心</span> ; <span style="color:blue;">生成海报</span> )</span>
                        </p>
                        <p><span style="color:#ccc">基础资料：</span> 30岁 | 高中 | 5年</p>
                        <p >
                            <span style="color:#ccc">完整度：</span>
                            <a-progress style="width:160px;" size="small" :percent="formState.completeness" />
                        </p>
                        <p>
                           
                            <span style="color:#ccc">服务号绑定状态：</span>
                            <span style="color:blue;margin-right: 20px;">邀请绑定</span>
                            <span style="color:blue">刷新结果</span>
                        </p>
                    </div>
                    <div style="width: 40%;vertical-align: middle;">
                        <p>
                            <span style="color:#ccc">账号积分：</span>
                            <span>80</span>
                        </p>
                        <p>
                            
                            <span style="color:#ccc">刷新时间：</span>
                            <span style="margin-right:20px">2022-12-10 10:53</span>
                            <span style="color:blue">刷新简历</span>
                        </p>
                    </div>
                </div>  

                <!-- 下 -->
                <a-tabs v-model:activeKey="activeKey" style="height:100%">
                    <a-tab-pane key="1" tab="跟进记录" style="display: flex;">
                        <div style="width:50%; padding: 1%;">
                            <a-form :model="tabs_formState">
                                <a-form-item label="跟进方式">
                                    <a-select v-model:value="value1" :size="size" style="width: 100%" :options="options" ></a-select>
                                </a-form-item>
                                <a-form-item label="下次跟进">
                                    <a-date-picker v-model:value="value1" style="width: 100%" />
                                </a-form-item>
                                <a-form-item label="跟进结果">
                                    <a-textarea v-model:value="value" placeholder="Basic usage" :rows="4" />
                                </a-form-item>
                                <a-form-item label="添加图片">
                                    <a-upload
                                        v-model:file-list="fileList"
                                        name="avatar"
                                        list-type="picture-card"
                                        class="avatar-uploader"
                                        :show-upload-list="false"
                                        action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
                                        :before-upload="beforeUpload"
                                        @change="handleChange"
                                    >
                                        <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
                                        <div v-else>
                                            <loading-outlined v-if="loading"></loading-outlined>
                                            <plus-outlined v-else></plus-outlined>
                                            <div class="ant-upload-text">Upload</div>
                                        </div>
                                    </a-upload>
                                </a-form-item>
                                <a-form-item>
                                    <a-button type="primary">Primary Button</a-button>
                                </a-form-item>
                            </a-form>
                        </div>
                        <a-card title="历史跟进" style="width:50%;">
                          <template #extra>共有 0条 跟进</template>
                          <p>card content</p>
                          <p>card content</p>
                          <p>card content</p>
                        </a-card>
                    </a-tab-pane>
                    <a-tab-pane key="2" tab="简历详情" force-render>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">基本信息<a-tag color="red" style="font-size: 0.01rem;">必填</a-tag></span>
                        <a-button style="float: right;" type="primary" v-show="sets" @click="setss">修改</a-button>
                      </div>
                      <a-divider />
                      <div style="display: flex;justify-content: space-between" v-show="sets">
                        <div>
                          <p>姓名：{{formState.name}}</p>
                          <p>性别：{{formState.sex}}</p>
                          <p>学历：{{formState.education}}</p>
                          <p>婚姻状况：{{formState.marital}}</p>
                          <p>所学专业：{{formState.major}}</p>
                          <p>籍贯：{{formState.native}}</p>
                          <p>手机号：{{formState.mobile}}</p>
                          <p>微信：{{formState.wechat}}</p>
                        </div>
                        <div>
                          <p>出生日期：{{formState.birthday}}</p>
                          <p>工作经验：{{formState.working}}</p>
                          <p>求职状态：{{formState.status_job}}</p>
                          <p>现居住地：{{formState.current_address}}</p>
                          <p>身高：{{formState.stature}}</p>
                          <p>身份证号：{{formState.id_number}}</p>
                          <p>邮箱：{{formState.mailbox}}</p>
                          <p>QQ：{{formState.qq}}</p>
                        </div>
                        <div>
                          <img src="http://houtai.74cmsse.tywangcai.com/upload/resource/empty_photo.png" alt="">
                          <p style="text-align: center;">个人照片</p>
                        </div>
                      </div>
                      <div v-show="!sets">
                        <a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
                          <a-form-item label="Activity name">
                            <a-input v-model:value="formState.name" />
                          </a-form-item>
                          <a-form-item label="Activity zone">
                            <a-select v-model:value="formState.region" placeholder="please select your zone">
                              <a-select-option value="shanghai">Zone one</a-select-option>
                              <a-select-option value="beijing">Zone two</a-select-option>
                            </a-select>
                          </a-form-item>
                          <a-form-item label="Activity time">
                            <a-date-picker
                              v-model:value="formState.date1"
                              show-time
                              type="date"
                              placeholder="Pick a date"
                              style="width: 100%"
                            />
                          </a-form-item>
                          <a-form-item label="Instant delivery">
                            <a-switch v-model:checked="formState.delivery" />
                          </a-form-item>
                          <a-form-item label="Activity type">
                            <a-checkbox-group v-model:value="formState.type">
                              <a-checkbox value="1" name="type">Online</a-checkbox>
                              <a-checkbox value="2" name="type">Promotion</a-checkbox>
                              <a-checkbox value="3" name="type">Offline</a-checkbox>
                            </a-checkbox-group>
                          </a-form-item>
                          <a-form-item label="Resources">
                            <a-radio-group v-model:value="formState.resource">
                              <a-radio value="1">Sponsor</a-radio>
                              <a-radio value="2">Venue</a-radio>
                            </a-radio-group>
                          </a-form-item>
                          <a-form-item label="Activity form">
                            <a-input v-model:value="formState.desc" type="textarea" />
                          </a-form-item>
                          <a-form-item :wrapper-col="{ span: 14, offset: 4 }">
                            <a-button type="primary" @click="onSubmit">Create</a-button>
                            <a-button style="margin-left: 10px" @click="setss">Cancel</a-button>
                          </a-form-item>
                        </a-form>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">求职意向<a-tag color="red" style="font-size: 0.01rem;">必填</a-tag></span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div style="display: flex;justify-content: space-between">
                        <div>
                          <p>工作性质：{{formState.job_nature}}</p>
                        </div>
                        <div>
                          <p>期望职位：{{formState.desired}}</p>
                        </div>
                        <div>
                          <p>工作地区：{{formState.work_address}}</p>
                        </div>
                        <div>
                          <p>期望行业：{{formState.industry}}</p>
                        </div>
                        <div>
                          <a-button style="margin-top: 20px;" type="link">编辑</a-button>
                          <a-button style="margin-top: 20px;" type="link" danger>删除</a-button>
                        </div>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">自我描述</span>
                        <a-button style="float: right;" type="primary">修改</a-button>
                      </div>
                      <a-divider />
                      <div style="display: flex;justify-content: space-between">
                        <div>
                          <p>奋斗自谦</p>
                        </div>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">教育经历</span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div>
                        <p>
                          {{formState.refresh}}~{{formState.last_time}}
                          <a-button style="float: right;" type="link" danger>删除</a-button>
                          <a-button style="float: right;" type="link">编辑</a-button>
                        </p>
                      </div>
                      <div style="display: flex;justify-content: space-between">
                        
                        <div>
                          <p>学校：家里蹲</p>
                        </div>
                        <div>
                          <p>专业：{{formState.major}}</p>
                        </div>
                        <div>
                          <p>取得学历：{{formState.education}}</p>
                        </div>
                        <div></div>
                        <div></div>
                        <div></div>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">工作经历</span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div>
                        <p>
                          {{formState.refresh}}~{{formState.last_time}}
                          <a-button style="float: right;" type="link" danger>删除</a-button>
                          <a-button style="float: right;" type="link">编辑</a-button>
                        </p>
                      </div>
                      <div style="display: flex;justify-content: space-between">
                        <div>
                          <p>公司名称：{{formState.job_nature}}</p>
                        </div>
                        <div>
                          <p>职位名称：{{formState.desired}}</p>
                        </div>
                        <div></div>
                        <div></div>
                        <div></div>
                        <div></div>
                        <div></div>
                      </div>
                      <div>
                        <p>工作职责：{{formState.work_address}}</p>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">培训经历</span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <a-button type="primary" shape="round">
                            + 你还没有添加培训经历，点击添加
                        </a-button>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">项目经历</span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <a-button type="primary" shape="round">
                            + 你还没有添加项目经历，点击添加
                        </a-button>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">获得证书</span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <a-button type="primary" shape="round">
                            + 你还没有添加证书，点击添加
                        </a-button>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">语言能力</span>
                        <a-button style="float: right;" type="primary">添加</a-button>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <a-button type="primary" shape="round">
                            + 你还没有添加语言能力，点击添加
                        </a-button>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">特长标签</span>
                        <a-button style="float: right;" type="primary">修改</a-button>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <p>未填写</p>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">照片作品</span>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <a-upload
                          v-model:file-list="fileList"
                          name="avatar"
                          list-type="picture-card"
                          class="avatar-uploader"
                          :show-upload-list="false"
                          action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
                          :before-upload="beforeUpload"
                          @change="handleChange"
                        >
                          <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
                          <div v-else>
                            <loading-outlined v-if="loading"></loading-outlined>
                            <plus-outlined v-else></plus-outlined>
                            <div class="ant-upload-text">Upload</div>
                          </div>
                        </a-upload>
                      </div>
                      <div style="margin-top: 10px;">
                        <span style="font-size: 15px;font-weight: 700;">附件简历</span>
                      </div>
                      <a-divider />
                      <div style="text-align: center;">
                        <a-upload
                          v-model:file-list="fileList"
                          name="avatar"
                          list-type="picture-card"
                          class="avatar-uploader"
                          :show-upload-list="false"
                          action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
                          :before-upload="beforeUpload"
                          @change="handleChange"
                        >
                          <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
                          <div v-else>
                            <loading-outlined v-if="loading"></loading-outlined>
                            <plus-outlined v-else></plus-outlined>
                            <div class="ant-upload-text">Upload</div>
                          </div>
                        </a-upload>
                      </div>
                    </a-tab-pane>
                    <a-tab-pane key="3" tab="会员信息">
                      <div style="display: flex;">
                        <div style="flex: 1;margin-right: 10px;">
                          <div>
                            <span>用户名：{{formState.name}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>解锁</a-button>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>改密</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>会员手机号：{{formState.mobile}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>修改</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>简历手机号：{{formState.mobile}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>修改</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>公开状态{{formState.audit}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>修改</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>简历等级{{formState.working}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>修改</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>绑定邮箱：{{formState.mailbox}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>修改</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>审核状态{{formState.audit}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>审核</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>简历作品：{{formState.name}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" danger>删除</a-button>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>审核</a-button>
                          </div>
                          <div>
                            <a-empty />
                          </div>
                          <a-divider />
                          <div>
                            <span>客服评价：好</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>填写</a-button>
                          </div>
                          <a-divider />
                          <div>
                            <span>备注信息：{{formState.remark}}</span>
                            <a-button style="margin-left: 10px;float: right;" type="primary" ghost>修改</a-button>
                          </div>
                          <a-divider />
                        </div>
                        <div style="flex: 1;margin-left: 10px;">
                          <div style="width: 100%; background-color: #fafcff;padding: 10px;">
                            <div style="margin-top: 10px;">
                              <span style="font-size: 15px;font-weight: 700;">基本信息</span>
                            </div>
                            <div style="display: flex;margin-top: 20px;">
                              <div>
                                <p>浏览职位：{{formState.desired}}</p>
                                <p>被查看：{{formState.examine}}</p>
                              </div>
                              <div>
                                <p>主动投递：{{formState.deliver}}</p>
                                <p>被下载：{{formState.download}}</p>
                              </div>
                              <div>
                                <p>主动刷新：{{formState.refresh}}</p>
                                <p>收到面邀：{{formState.side}}</p>
                              </div>
                            </div>
                          </div>
                          <div style="width: 100%; background-color: #fafcff;padding: 10px;margin-top: 20px;">
                            <div style="margin-top: 10px;">
                              <span style="font-size: 15px;font-weight: 700;">会员账号情况</span>
                            </div>
                            <div style="margin-top: 20px;">
                              <div>
                                <p>最近登录{{formState.login_time}}</p>
                                <p>注册时间：{{formState.refresh}}</p>
                                <p>最后跟进：{{formState.last_time}}</p>
                              </div>
                            </div>
                          </div>
                          <div style="width: 100%; background-color: #fafcff;padding: 10px;margin-top: 20px;">
                            <div style="margin-top: 10px;">
                              <span style="font-size: 15px;font-weight: 700;">短视频求职</span>
                            </div>
                            <div style="margin-top: 20px;">
                              <div>
                                <a-empty />
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </a-tab-pane>
                    <a-tab-pane key="4" tab="求职动态">
                      <a-button style="margin-right: 10px;" type="primary">主动投递</a-button>
                      <a-button style="margin-right: 10px;" type="primary">收到面邀</a-button>
                      <a-button style="margin-right: 10px;" type="primary">被查看</a-button>
                      <a-button style="margin-right: 10px;" type="primary">浏览过</a-button>
                      <a-table :columns="columnss" :data-source="data" style="margin-top: 20px;">
                      </a-table>
                      <a-pagination
                        :current="current1"
                        :page-size="pageSize1"
                        :total="0"
                        :show-total="total => `共 ${0} 条`"
                        showSizeChanger
                        showQuickJumper
                        @change="PageChange"
                        @showSizeChange="showSizeChange"
                    />
                    </a-tab-pane>
                    <a-tab-pane key="5" tab="会员积分">
                      <a-table :columns="columnss" :data-source="data" style="margin-top: 20px;">
                      </a-table>
                      <a-pagination
                        :current="current1"
                        :page-size="pageSize1"
                        :total="0"
                        :show-total="total => `共 ${0} 条`"
                        showSizeChanger
                        showQuickJumper
                        @change="PageChange"
                        @showSizeChange="showSizeChange"
                    />
                    </a-tab-pane>
                    <a-tab-pane key="6" tab="操作日志">
                      <a-table :columns="columnss" :data-source="data" style="margin-top: 20px;">
                      </a-table>
                      <a-pagination
                        :current="current1"
                        :page-size="pageSize1"
                        :total="0"
                        :show-total="total => `共 ${0} 条`"
                        showSizeChanger
                        showQuickJumper
                        @change="PageChange"
                        @showSizeChange="showSizeChange"
                    />
                    </a-tab-pane>
                </a-tabs>
            </div>
        </a-drawer>
        <a-modal v-model:visible="visible1" title="将所选简历设置为" @ok="handleOk">
          <a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
            <a-form-item label="审核状态">
              <a-radio-group v-model:value="audit">
                <a-radio value="1">待审核</a-radio>
                <a-radio value="2">已通过</a-radio>
                <a-radio value="3">未通过</a-radio>
              </a-radio-group>
            </a-form-item>
          </a-form>
        </a-modal>
    </div>
</template>

<script setup>
import { message } from 'ant-design-vue'
import { reactive, ref,toRefs,onMounted,computed } from 'vue'
import { useRouter } from 'vue-router'
import {getjianli,deljianli} from '../../../api/jianli'
    let router = useRouter()
    let value1 = ref('id')
    let value2 = ref('')
    let value3 = ref('')
    let value4 = ref('')
    let value5 = ref('请选择注册来源')
    let sets = ref(true)
    // 标签页key值
    const activeKey = ref('1')
    const audit = ref('1')
    // 页数
    const current1 = ref(1)
    // 每页条数
    const pageSize1 = ref(10)
    const count = ref(0)
    const query = ref('name') // 搜索条件
    let {
            options,
            options3,
            options2,
            columns,
            datas,
            selectedRowKeys,
            loading,
            formState,
            tabs_formState, // 标签页表单数据
        } = toRefs(reactive({
            formState:{},
            tabs_formState:{},
        options:[
            {
                value: 'zhejiang',
                label: 'Zhejiang',
                children: [
                {
                    value: 'hangzhou',
                    label: 'Hangzhou',
                    children: [
                    {
                        value: 'xihu',
                        label: 'West Lake',
                    },
                    ],
                },
                ],
            },
            {
                value: 'jiangsu',
                label: 'Jiangsu',
                children: [
                {
                    value: 'nanjing',
                    label: 'Nanjing',
                    children: [
                    {
                        value: 'zhonghuamen',
                        label: 'Zhong Hua Men',
                    },
                    ],
                },
                ],
            }
        ],
        options2:[
        {
            value: '生活',
            label: '生活',
            children: [
              {
                value: '餐饮',
                label: '餐饮',
                children:[
                  {
                    value:'服务员',
                    label:'服务员',
                  },
                  {
                    value:'后厨',
                    label:'后厨',
                  },
                  {
                    value:'传菜员',
                    label:'传菜员',
                  },
                  {
                    value:'配菜/打荷',
                    label:'配菜/打荷',
                  },
                  {
                    value:'洗碗工',
                    label:'洗碗工',
                  },
                ]
              },
              {
                value: '家政保洁/安保',
                label: '家政保洁/安保',
                children: [
                  {
                    value: '保洁',
                    label: '保洁',
                  },
                  {
                    value: '保姆',
                    label: '保姆',
                  },
                  {
                    value: '月嫂',
                    label: '月嫂',
                  },
                  {
                    value: '育婴师/保育员',
                    label: '育婴师/保育员',
                  },
                  {
                    value: '洗衣工',
                    label: '洗衣工',
                  },
                ],
              },
              {
                value: '美容/美发',
                label: '美容/美发',
                children: [
                  {
                    value: '发型师',
                    label: '发型师',
                  },
                  {
                    value: '美发助理/学徒',
                    label: '美发助理/学徒',
                  },
                  {
                    value: '洗头工',
                    label: '洗头工',
                  },
                  {
                    value: '美容导师',
                    label: '美容导师',
                  },
                  {
                    value: '美容师',
                    label: '美容师',
                  },
                ],
              },
              {
                value: '酒店/旅游',
                label: '酒店/旅游',
                children: [
                  {
                    value: '酒店前台',
                    label: '酒店前台',
                  },
                  {
                    value: '客房服务员',
                    label: '客房服务员',
                  },
                  {
                    value: '楼面经理',
                    label: '楼面经理',
                  },
                  {
                    value: '行李员',
                    label: '行李员',
                  },
                  {
                    value: '救生员',
                    label: '救生员',
                  },
                ],
              },
              {
                value: '娱乐/休闲',
                label: '娱乐/休闲',
                children: [
                  {
                    value: '酒吧服务员',
                    label: '酒吧服务员',
                  },
                  {
                    value: '娱乐厅服务员',
                    label: '娱乐厅服务员',
                  },
                  {
                    value: '礼仪/迎宾',
                    label: '礼仪/迎宾',
                  },
                  {
                    value: '主持人',
                    label: '主持人',
                  },
                  {
                    value: '调酒师',
                    label: '调酒师',
                  },
                ],
              },
              {
                value: '保健按摩',
                label: '保健按摩',
                children: [
                  {
                    value: '按摩师',
                    label: '按摩师',
                  },
                  {
                    value: '足疗师',
                    label: '足疗师',
                  },
                  {
                    value: '搓澡工',
                    label: '搓澡工',
                  },
                  {
                    value: '针灸推拿',
                    label: '针灸推拿',
                  }
                ],
              }
            ],
        },
        {
            value: '人力 | 行政 | 管理',
            label: '人力 | 行政 | 管理',
            children: [
              {
                value: '人力/行政/后勤',
                label: '人力/行政/后勤',
                children:[
                  {
                    value:'文员',
                    label:'文员',
                  },
                  {
                    value:'前台/总机/接待',
                    label:'前台/总机/接待',
                  },
                  {
                    value:'人事专员/助理',
                    label:'人事专员/助理',
                  },
                  {
                    value:'人事经理/主管',
                    label:'人事经理/主管',
                  },
                  {
                    value:'人事总监',
                    label:'人事总监',
                  },
                ]
              },
              {
                value: '司机',
                label: '司机',
                children: [
                  {
                    value: '商务司机',
                    label: '商务司机',
                  },
                  {
                    value: '客运司机',
                    label: '客运司机',
                  },
                  {
                    value: '货运司机',
                    label: '货运司机',
                  },
                  {
                    value: '出租车司机',
                    label: '出租车司机',
                  },
                  {
                    value: '班车司机',
                    label: '班车司机',
                  },
                ],
              },
              {
                value: '高级管理',
                label: '高级管理',
                children: [
                  {
                    value: 'CEO/总裁/总经理',
                    label: 'CEO/总裁/总经理',
                  },
                  {
                    value: '首席运营官COO',
                    label: '首席运营官COO',
                  },
                  {
                    value: '首席财务官CFO',
                    label: '首席财务官CFO',
                  },
                  {
                    value: '首席技术官CTO',
                    label: '首席技术官CTO',
                  },
                  {
                    value: '副总裁/副总经理',
                    label: '副总裁/副总经理',
                  },
                ],
              },
            ],
        },
        {
            value: '销售 | 客服 | 采购 | 淘宝',
            label: '销售 | 客服 | 采购 | 淘宝',
            children: [
              {
                value: '销售',
                label: '销售',
                children:[
                  {
                    value:'销售代表',
                    label:'销售代表',
                  },
                  {
                    value:'销售助理',
                    label:'销售助理',
                  },
                  {
                    value:'销售经理/主管',
                    label:'销售经理/主管',
                  },
                  {
                    value:'销售总监',
                    label:'销售总监',
                  },
                  {
                    value:'电话销售',
                    label:'电话销售',
                  },
                ]
              },
              {
                value: '客服',
                label: '客服',
                children: [
                  {
                    value: '客服专员/助理',
                    label: '客服专员/助理',
                  },
                  {
                    value: '客服经理/主管',
                    label: '客服经理/主管',
                  },
                  {
                    value: '客服总监',
                    label: '客服总监',
                  },
                  {
                    value: '售前/售后服务',
                    label: '售前/售后服务',
                  },
                  {
                    value: '电话客服',
                    label: '电话客服',
                  },
                ],
              },
              {
                value: '贸易/采购',
                label: '贸易/采购',
                children: [
                  {
                    value: '外贸专员/助理',
                    label: '外贸专员/助理',
                  },
                  {
                    value: '外贸经理/主管',
                    label: '外贸经理/主管',
                  },
                  {
                    value: '采购员',
                    label: '采购员',
                  },
                  {
                    value: '采购助理',
                    label: '采购助理',
                  },
                  {
                    value: '采购经理/总监',
                    label: '采购经理/总监',
                  },
                  {
                    value: '报关员',
                    label: '报关员',
                  },
                  {
                    value: '商务专员/经理',
                    label: '商务专员/经理',
                  },
                  {
                    value: '买手',
                    label: '买手',
                  },
                ],
              },
            ],
        },
        {
            value: '市场 | 媒介 | 广告 | 设计',
            label: '市场 | 媒介 | 广告 | 设计',
            children: [
              {
                value: '市场/媒介/公关',
                label: '市场/媒介/公关',
                children:[
                  {
                    value:'市场专员/助理',
                    label:'市场专员/助理',
                  },
                  {
                    value:'市场经理/总监',
                    label:'市场经理/总监',
                  },
                  {
                    value:'市场拓展',
                    label:'市场拓展',
                  },
                  {
                    value:'市场调研',
                    label:'市场调研',
                  },
                  {
                    value:'市场策划',
                    label:'市场策划',
                  },
                  {
                    value:'媒介专员/助理',
                    label:'媒介专员/助理',
                  },
                ]
              },
              {
                value: '广告/会展/咨询',
                label: '广告/会展/咨询',
                children: [
                  {
                    value: '媒介策划/管理',
                    label: '媒介策划/管理',
                  },
                  {
                    value: '会展策划/设计',
                    label: '会展策划/设计',
                  },
                  {
                    value: '婚礼策划师',
                    label: '婚礼策划师',
                  },
                  {
                    value: '咨询顾问',
                    label: '咨询顾问',
                  },
                  {
                    value: '咨询经理/主管',
                    label: '咨询经理/主管',
                  },
                  {
                    value: '客户主管/专员',
                    label: '客户主管/专员',
                  },
                  {
                    value: '企业策划',
                    label: '企业策划',
                  },
                ],
              },
              {
                value: '美术/设计/创意',
                label: '美术/设计/创意',
                children: [
                  {
                    value: '工艺/珠宝设计',
                    label: '工艺/珠宝设计',
                  },
                  {
                    value: '多媒体/动画设计',
                    label: '多媒体/动画设计',
                  },
                  {
                    value: '产品/包装设计',
                    label: '产品/包装设计',
                  },
                  {
                    value: '装修装潢设计',
                    label: '装修装潢设计',
                  },
                  {
                    value: 'CAD设计/制图',
                    label: 'CAD设计/制图',
                  },
                ],
              },
            ],
        },
        {
            value: '生产 | 物流 | 质控 | 汽车',
            label: '生产 | 物流 | 质控 | 汽车',
            children: [
              {
                value: '普工/技工',
                label: '普工/技工',
                children:[
                  {
                    value:'普工',
                    label:'普工',
                  },
                  {
                    value:'综合维修工',
                    label:'综合维修工',
                  },
                  {
                    value:'制冷/水暖工',
                    label:'制冷/水暖工',
                  },
                  {
                    value:'电工',
                    label:'电工',
                  },
                  {
                    value:'木工',
                    label:'木工',
                  },
                  {
                    value:'钳工',
                    label:'钳工',
                  },
                  {
                    value:'切割/焊工',
                    label:'切割/焊工',
                  },
                ]
              },
              {
                value: '生产管理/研发',
                label: '生产管理/研发',
                children: [
                  {
                    value: '车间主任',
                    label: '车间主任',
                  },
                  {
                    value: '生产计划',
                    label: '生产计划',
                  },
                  {
                    value: '化验/检验',
                    label: '化验/检验',
                  },
                  {
                    value: '厂长/副厂长',
                    label: '厂长/副厂长',
                  },
                  {
                    value: '生产总监',
                    label: '生产总监',
                  },
                  {
                    value: '维修工程师',
                    label: '维修工程师',
                  },
                  {
                    value: '工业工程师',
                    label: '工业工程师',
                  },
                ],
              },
              {
                value: '物流/仓储',
                label: '物流/仓储',
                children: [
                  {
                    value: '仓库经理/主管',
                    label: '仓库经理/主管',
                  },
                  {
                    value: '装卸/搬运工',
                    label: '装卸/搬运工',
                  },
                  {
                    value: '供应链管理',
                    label: '供应链管理',
                  },
                  {
                    value: '单证员',
                    label: '单证员',
                  },
                  {
                    value: '国际运输',
                    label: '国际运输',
                  },
                ],
              },
              {
                value: '服装/纺织/食品',
                label: '服装/纺织/食品',
                children: [
                  {
                    value: '样衣工',
                    label: '样衣工',
                  },
                  {
                    value: '食品/饮料研发/检验',
                    label: '食品/饮料研发/检验',
                  },
                  {
                    value: '板房/底格出格师',
                    label: '板房/底格出格师',
                  },
                  {
                    value: '电脑放码员',
                    label: '电脑放码员',
                  },
                  {
                    value: '纸样师/车板工',
                    label: '纸样师/车板工',
                  },
                ],
              },
              {
                value: '质防/安防',
                label: '质防/安防',
                children: [
                  {
                    value: '质量管理/测试经理',
                    label: '质量管理/测试经理',
                  },
                  {
                    value: '测试工程师',
                    label: '测试工程师',
                  },
                  {
                    value: '安全消防',
                    label: '安全消防',
                  },
                  {
                    value: '认证工程师/审核员',
                    label: '认证工程师/审核员',
                  },
                  {
                    value: '安全管理',
                    label: '安全管理',
                  },
                ],
              },
            ],
        },
    ],
    options3:[
        {
            value: '北京',
            label: '北京',
            children: [
              {
                value: '海淀',
                label: '海淀',
                children:[
                  {
                    value:'西三环',
                    label:'西三环',
                  },
                  {
                    value:'北三环',
                    label:'北三环',
                  }
                ]
              }
            ],
        },
        {
            value: '上海',
            label: '上海',
            children: [
              {
                value: '嘉定',
                label: '嘉定',
                children:[
                  {
                    value:'新成公园',
                    label:'新成公园',
                  },
                  {
                    value:'上海师范',
                    label:'上海师范',
                  },
                ]
              }
            ],
        },
        {
            value: '广东',
            label: '广东',
            children: [
              {
                value: '广州',
                label: '广州',
                children:[
                  {
                    value:'海珠',
                    label:'海珠',
                  },
                  {
                    value:'黄埔',
                    label:'黄埔',
                  }
                ]
              }
            ]
        }
    ],
        columns:[
            { title: 'ID',width: 50, dataIndex: 'id', key: 'id', fixed: 'left' },
            { title: '照片',width: 80, dataIndex: 'user_img', key: 'id' ,slots:{customRender:'user_img'}},
            { title: '学历',width: 80,  dataIndex: 'education', key: 'id' },
            { title: '姓名', dataIndex: 'name', key: 'id'},
            { title: '微信绑定', dataIndex: 'wechat', key: 'id'},
            { title: '经验', dataIndex: 'working', key: 'id' },
            { title: '简历完成度', dataIndex: 'completeness', key: 'id' },
            { title: '审核状态', dataIndex: 'audit', key: 'id' },
            { title: '简历联系方式', dataIndex: 'mobile', key: 'id' },
            { title: '会员联系方式', dataIndex: 'mobile', key: 'id' },
            { title: '等级', dataIndex: 'completeness', key: 'id' },
            { title: '投递数', dataIndex: 'deliver', key: 'id' },
            { title: '被下载', dataIndex: 'download', key: 'id' },
            { title: '被查看', dataIndex: 'examine', key: 'id' },
            { title: '被面邀', dataIndex: 'side', key: 'id' },
            { title: '刷新时间', dataIndex: 'refresh', key: 'id' },
            { title: '登陆时间', dataIndex: 'login_time', key: 'id' },
            { title: '注册时间', dataIndex: 'add_time', key: 'id' },
            { title: '联系状态', dataIndex: 'relation', key: 'id' },
            { title: '跟进次数', dataIndex: 'follow', key: 'id' },
            { title: '最后跟进', dataIndex: 'last_time', key: 'id' },
            { title: '简历备注', dataIndex: 'remark', key: 'id' },
            {
                title: 'Action',
                key: 'id',
                fixed: 'right',
                width: 100,
                slots:{customRender:'action'}
            },
        ],
        columnss:[
          { title: '职位名称', dataIndex: 'login_time', key: 'id' },
          { title: '公司名称', dataIndex: 'login_time', key: 'id' },
          { title: '反馈状态', dataIndex: 'login_time', key: 'id' },
          { title: '投递时间', dataIndex: 'login_time', key: 'id' },
        ],
        datas:[],
        selectedRowKeys: [],
        loading: false,
    }))
    const setss = ()=>{
      sets.value=!sets
    }
    const getdata = async()=>{
        let {data} = await getjianli({page:current1.value,page_size:pageSize1.value,inpu1:value1.value,inpu2:value2.value,inpu3:value3.value,inpu4:value4.value})
        console.log(data);
        count.value = data.count
        datas.value=data.data
    }
    const hasSelected = computed(() => selectedRowKeys.value.length > 0);
    const start = () => {
      loading.value = true;
      // ajax request after empty completing
      setTimeout(() => {
        loading.value = false;
        selectedRowKeys.value = [];
      }, 1000);
    };
    const onSelectChange = selectedRowKeys => {
      console.log('selectedRowKeys changed: ', selectedRowKeys);
      selectedRowKeys.value = selectedRowKeys;
    };

    // 删除
    const del = async (id)=>{
        let {data} = await deljianli(id)
        data.code == 200 ? (message.success(data.message),getdata()) : message.error('删除失败'+data.message)
    }

    // 改变页数触发
    const PageChange = (v) =>{
        current1.value = v
        getdata()
    }

    // 改变每页条数触发
    const showSizeChange = (v,v1) =>{
        pageSize1.value = v1
        getdata()
    }

    // selete触发事件
    const SelectChange = (v)=>{
        console.log(v);
    }
    const visible = ref(false);

    const afterVisibleChange = bool => {
      console.log('visible', bool);
    };

    const showDrawer = (v) => {
        formState.value=v
        console.log(v);
      visible.value = true;
    };
    // 审核
    const visible1 = ref(false);

    const showModal = () => {
      visible1.value = true;
    };

    const handleOk = e => {
      console.log(e);
      visible1.value = false;
    };
    onMounted(()=>{
        getdata()
    })
    
</script>

<style scoped lang="scss">
    .drawer_top{
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        p{
            margin: 0;
        }
    }

    .avatar-uploader > .ant-upload {
  width: 128px;
  height: 128px;
}
.ant-upload-select-picture-card i {
  font-size: 32px;
  color: #999;
}

.ant-upload-select-picture-card .ant-upload-text {
  margin-top: 8px;
  color: #666;
}
</style>